import 'package:decimal/decimal.dart';
import 'package:json_annotation/json_annotation.dart';

import 'EcyMyOrderCommodity.dart';
import 'UserGroupBuyItemVo.dart';

part 'EcyMyOrder.g.dart';

@JsonSerializable()
class EcyMyOrder {
  String? orderId;
  String? orderCode;
  String? orderTime;
  int? orderStatus;
  String? orderType;
  int? payChannel;
  double? postage;
  String? logisticsCode; // 物流单号
  int? shippingMethod; // 订单收货方式
  String? selfPickupQrcode; // 自提核销码
  List<EcyMyOrderCommodity>? commodities;
  List<UserGroupBuyItemVo>? groupBuyItems;
  String? shippingId;

  EcyMyOrder(
      this.orderId,
      this.orderCode,
      this.orderTime,
      this.orderStatus,
      this.orderType,
      this.payChannel,
      this.postage,
      this.logisticsCode,
      this.shippingMethod,
      this.selfPickupQrcode,
      this.commodities,
      this.groupBuyItems,
      this.shippingId);

  factory EcyMyOrder.fromJson(Map<String, dynamic> json) =>
      _$EcyMyOrderFromJson(json);

  Map<String, dynamic> toJson() => _$EcyMyOrderToJson(this);
}
